﻿@model ElectronicsMarket.Models.RegisterModel

@{
    ViewBag.Title = "Đăng ký";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Đăng Kí</h2>  
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm("Register", "Account", FormMethod.Post))
{
    @Html.ValidationSummary(true, "Tài khoản sai. Vui lòng kiểm tra và thử lại.")


    <div class="dangky">
        <table style="width = 560px;">
            <tr>
                <td colspan = '2' align='left' valign='middle'>
                    <h5>Thông tin tài khoản</h5>
                </td>
            </tr>
            <tr>
                <td width='150' align='right'>
                    <div class="editor-label">
                        @Html.LabelFor(m => m.UserName) :
                    </div>
                </td>
                <td width='410'>
                    <div class="editor-field">
                        @Html.TextBoxFor(m => m.UserName)
                        <span style="color:Red">@Html.ValidationMessageFor(m => m.UserName)</span>
                        
                    </div>
                </td>
            </tr>
            <tr>
                <td align='right'>
                    <div class="editor-label">
                        @Html.LabelFor(m => m.Password) :
                    </div>
                </td>
                <td >
                    <div class="editor-field">
                        @Html.PasswordFor(m => m.Password)
                        <span style="color:Red">@Html.ValidationMessageFor(m => m.Password)</span>
                    </div>
                </td>
            </tr>
            <tr>
                <td align='right'>
                    <div class="editor-label">
                        @Html.LabelFor(m => m.ConfirmPassword) :
                    </div>
                </td>
                <td >
                    <div class="editor-field">
                        @Html.PasswordFor(m => m.ConfirmPassword)
                        <span style="color:Red">@Html.ValidationMessageFor(m => m.ConfirmPassword)</span>
                    </div>
                </td>
            </tr>

            <tr>
                <td align='right'>
                    <div class="editor-label">
                        @Html.LabelFor(m => m.Email) :
                    </div> 
                </td>
                <td >
                    <div class="editor-field">
                        @Html.TextBoxFor(m => m.Email)
                        <span style="color:Red">@Html.ValidationMessageFor(m => m.Email)</span>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan = '2' align='left' valign='middle'><h5>Thông tin cá nhân</h5></td>
            </tr>

            <tr>
            <td align='right'>
                <div class="editor-label">
                    @Html.LabelFor(m => m.FirstName) :
                </div>
            </td>
            <td>
                <div class="editor-field">
                    @Html.TextBoxFor(m => m.FirstName)
                    <span style="color:Red">@Html.ValidationMessageFor(m => m.FirstName)</span>
                </div>
                </td>
            </tr>
            <tr>
            <td align='right'>
                <div class="editor-label">
                    @Html.LabelFor(m => m.LastName) :
                </div>
            </td>
            <td>
                <div class="editor-field">
                    @Html.TextBoxFor(m => m.LastName)
                    <span style="color:Red">@Html.ValidationMessageFor(m => m.LastName)</span>
                </div>
            </td>
            </tr>
            
            <tr>
            <td align='right'>
                <div class="editor-label">
                    @Html.LabelFor(m => m.PhoneNumber) :
                </div>
            </td>
            <td>
                <div class="editor-field">
                    @Html.TextBoxFor(m => m.PhoneNumber)
                    <span style="color:Red">@Html.ValidationMessageFor(m => m.PhoneNumber)</span>
                </div>
            </td>
            </tr>

            <tr>
            <td align='right'>
                <div class="editor-label">
                    @Html.LabelFor(m => m.Address) :
                </div>
            </td>
            <td>
                <div class="editor-field">
                    @Html.TextBoxFor(m => m.Address)
                    <span style="color:Red">@Html.ValidationMessageFor(m => m.Address) </span>
                </div>
            </td>
            </tr>
            
            <tr>
            <td align='right'>
                <div class="editor-label">
                    @Html.LabelFor(m => m.Birthday) :
                </div>
            </td>
            <td>
                <div class="editor-field">
                    @Html.TextBoxFor(m => m.Birthday)
                    <span style="color:Red">@Html.ValidationMessageFor(m => m.Birthday) </span>
                </div>
            </td>
            </tr>

            <tr>
            <td align='right'>
                <div class="editor-label">
                    @Html.LabelFor(m => m.Sex) :
                </div>
            </td>
            <td>
                <div class="editor-field">
                    <span>Nam </span>@Html.RadioButton("Nam", true)
                    <span>Nữ </span>@Html.RadioButton("Nam", false)
                </div>
            </td>
            </tr>

            <tr>
                <td colspan='2'><span class='ngang'></span></td>
            </tr>

            <tr>
                <td align='right'><input type='submit' name='submit' value='Đăng Kí'></td>
                <td><input type='reset' value='Xóa Hết'></td>
            </tr>                
        </table>
    </div>    
}
    